package com.itheima.service;

import com.itheima.entity.PageResult;
import com.itheima.entity.QueryPageBean;
import com.itheima.pojo.Role;
import org.springframework.transaction.annotation.Transactional;

import java.util.Map;
import java.util.List;

@Transactional(readOnly = true)
public interface RoleService {
    PageResult pageQuery(QueryPageBean queryPageBean);

    Map<String, Object> findAllDetail();

    @Transactional(readOnly = false)
    void add(Role role, Integer[] authorityIds, Integer[] menuIds);

    Role findById(Integer id);

    Map<String, Object> findmenuIdsAndpermissionIdByroleId(Integer roleId);

    @Transactional(readOnly = false)
    void edit(Role role, Integer[] authorityIds, Integer[] menuIds);

    @Transactional(readOnly = false)
    void delete(Integer roleId);

    List<Role> findAll();
}
